import serial

#A basic set of commands for sending stuff over the serial port
#Change the port and baud as need be
#to use, in another file:
#import serialeasy
#serialeasy.connect()
#serialeasy.ardout("some message")


baud = 9600
port = "/dev/ttyUSB0"
ser = serial.Serial(port,baud)
ser.timeout = 0.01

def ardout(string):
	ser.write(string+"\r\n")
	a = ser.readlines()
	s = ""
	for i in a:
		s += i
	print s




def connect():
	ser.open()

def disconnect():
	ser.close()

